<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>05 js 基本数据类型和引用数据类型</title>
</head>
<body>
    

    <script>
        //基本数据类型：按值访问,  保存在栈内存中，互不影响
        // 引用数据类型：按址访问

        var a = 10;
        var b = a;
        b = 20;
        console.log('a:', a);  //10
        console.log('b:', b);  //20
        
        var obj1 = {};
        var obj2 = obj1;
        obj2.name = '小黑';
        console.log('obj1', obj1.name);
        console.log('obj2', obj2.name);
        
        



    </script>
</body>
</html>